package com.zaimokuza.cn.entity.auth;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;

/**
 * @author zaimokuza
 */
@ApiModel("资源")
@Data
public class Resources {

    @ApiModelProperty("资源ID")
    private long id;
    @ApiModelProperty("资源名称")
    @NotBlank(message = "请填写资源名称！")
    private String name;
    @ApiModelProperty("父资源ID")
    @NotNull(message = "请选择资源父节点！")
    private long parentId;
    @ApiModelProperty("父资源名称")
    private String parentName;
    @ApiModelProperty("对应url")
    private String url;
    @ApiModelProperty("类型   0：目录   1：菜单   2：按钮")
    @NotNull(message = "请选择资源类型！")
    private Integer type;
    @ApiModelProperty("图标")
    private String icon;
    @ApiModelProperty("vue标识")
    private String vueMark;
    @ApiModelProperty("vue路由")
    private String vuePath;
    @ApiModelProperty("vue组件路径")
    private String vueComponent;
    @ApiModelProperty("排序标识")
    private Integer order;
    @ApiModelProperty("创建人")
    private String createdBy;
    @ApiModelProperty("创建时间")
    private String createdTime;
    @ApiModelProperty("更新人")
    private String updatedBy;
    @ApiModelProperty("更新时间")
    private String updatedTime;
    @ApiModelProperty("子资源集合")
    private ArrayList<Resources> childList;

}
